<?php
/**
 * 我的证书模型
 * @author LXf
 * @date 2018.8.24
 */

namespace App\Model\Crm;

use App\model\BaseModel;
use DB;

class MyCertificateModel extends BaseModel{
     /***
     *我的证书列表 
     ***/
    const MY_CERTIFICATE = 'my_certificate';
    public static function listCertificate($orderby="id"){
        
        return DB::table(self::MY_CERTIFICATE)->orderBy($orderby)->get();

    }
    /***
     *添加我的证书 
     ***/
    public static function addCertificate($data){
        
        return DB::table(self::MY_CERTIFICATE)->insert($data);

    }
     /***
     *修改我的证书
     ***/
    public static function updateCertificate($where,$data){
        
        return DB::table(self::MY_CERTIFICATE)->where($where)->update($data);

    }
    public static function delCertificate($where){
       return DB::table(self::MY_CERTIFICATE)->where($where)->delete();
    }

}